<extend name="Extends/base" />
<block name="title">推手管理后台</block>
<block name="css">
    <style>
        .menu-collapse .sub-menu li a {
            background: #f5f5f5
        }
    </style>
</block>
<block name="body_style">class="bgc-f2f4f6"</block>
<block name="body">
    <div class="header bgc-fff c-border-b">
        <div class="c-row">
            <div class="c-50">
                <div class="pl20 pt5">
                    <img src="__WOR__/images/logo.png" height="50">
                </div>
            </div>
            <div class="c-push-right c-50">
                <div class="p20 clearfix">
                    <ul class="fr">
                        <li class="fl pl20" style='line-height:24px'>
                            <span id="userName">{$userInfo.name}({$userInfo.phone})</span>
                        </li>
                        <li class="fl pl20">
                            <a href="javascript:;" class="loginout c-btn-green c-btn-tiny">退出登录</a>
                        </li>
                    </ul>
                </div>
            </div>
        </div>
    </div>
    <div class="page-layout-menu c-position-f c-hidden" data-toggle="pageLayoutMenu">
        <div class="referral-menu-box">
            <include file="Index/menuBox" />
        </div>
    </div>
    <div class="page-layout-main c-position-a" style="top:65px">
        <iframe frameborder="no" src="" width="100%" id="referralIframe"></iframe>
    </div>
</block>
<block name="js">
    <script type="text/javascript"
        src="__PC__/widget/nicescroll/3.6.0/js/jquery.nicescroll.min.js?v={:C('JS_CSS_VERSION')}"></script>
    <script type="text/javascript" src="__WOR__/js/api.js?v={:C('JS_CSS_VERSION')}"></script>
    <script type="text/javascript" src="__WOR__/js/login.api.js?v={:C('JS_CSS_VERSION')}"></script>

    
    <script type="text/javascript">
        $(function () {
            $(".page-layout-menu").height($(window).height()).niceScroll({
                cursorborder: "",
                cursorcolor: "#cccdd1"
            });

            $('#referralIframe').height($(window).height() - 65);
            $('.menu-collapse a:first').trigger("click");
        });

        /**
         * 点击导航加载iframe
         */
        $('.menu-collapse').on('click', 'a', function () {
            $('.menu-collapse a').removeClass("curr");
            $(this).addClass("curr");
            var url = $(this).data('src');
            url = $.sUrl(url);
            $('#referralIframe').attr('src', url);
        });

        /**
         * 退出登录
         */
        $('.loginout').on('click', function () {
            doLogout(function (res) {
                if (res.Code != 10000) {
                    $.toast(res.Message);
                    return false;
                }
                location.reload();
            });
        });
    </script>
</block>